import request from '@/utils/request'

/**
 * 获取列表
 * @param query
 * @return {*}
 */
export function page(query) {
  return request({
    url: '/gcxt/knowledgeBase/page',
    method: 'get',
    params: query
  })
}

/**
 * 新增记录
 * @param data 数据
 * @return {*}
 */
export function addOrUpdate(data) {
  return request({
    url: '/gcxt/knowledgeBase/addOrUpdate',
    method: 'post',
    headers: {
      'Content-Type': 'multipart/form-data'
    },
    data: data
  })
}

/**
 * 修改记录
 * @param data 数据
 * @return {*}
 */
export function edit(data) {
  return request({
    url: '/gcxt/knowledgeBase/edit',
    method: 'post',
    data: data
  })
}

/**
 * 删除记录
 * @param data
 * @return {*}
 */
export function deleteById(data) {
  return request({
    url: '/gcxt/knowledgeBase/delete',
    method: 'post',
    data: data
  })
}

